package csd.wyaiyr.com.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "sys_user")
public class SysUser implements Serializable {
// 手机号

    @Id
    @Column(name = "mobile_phone_number")
    private String mobilePhoneNumber;

//   盐度值

    private String salt;

//    手机号后6位数字

    @Column(name = "pass_word")
    private String passWord;

    @Column(name = "create_time")
    private Date createTime;

    private static final long serialVersionUID = 1L;

//    获取手机号11位

    public String getMobilePhoneNumber() {
        return mobilePhoneNumber;
    }

//    设置手机号11位

    public void setMobilePhoneNumber(String mobilePhoneNumber) {
        this.mobilePhoneNumber = mobilePhoneNumber;
    }

//  获取盐度值

    public String getSalt() {
        return salt;
    }

//   设置盐度值

    public void setSalt(String salt) {
        this.salt = salt;
    }

//   获取手机号后6位数字

    public String getPassWord() {
        return passWord;
    }

//    设置手机号后6位数字

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysUser other = (SysUser) that;
        return (this.getMobilePhoneNumber() == null ? other.getMobilePhoneNumber() == null : this.getMobilePhoneNumber().equals(other.getMobilePhoneNumber()))
            && (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
            && (this.getPassWord() == null ? other.getPassWord() == null : this.getPassWord().equals(other.getPassWord()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMobilePhoneNumber() == null) ? 0 : getMobilePhoneNumber().hashCode());
        result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
        result = prime * result + ((getPassWord() == null) ? 0 : getPassWord().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }
}